<?php

class Zend_Db_ActiveRecord_Select extends Zend_Db_Select
{
	
	public static function cloneCountSelect(Zend_Db_Select $select)
	{
		$count = new Zend_Db_Select($select->getAdapter());
		$count->_parts = $select->_parts;
		$count->_parts[self::COLUMNS] = array();
		$count->columns('COUNT(*)');
		return $count;
	}
}